<!--
 * @FileDescription 毫米波过滤器状态查询
 * @Author 杨宇翔
 * @Date 20220531 14:02:48
 * @LastEditors 杨宇翔
 * @LastEditTime 20220531 14:02:48
-->
<template>
    <div class="filter-information">
        <div class="container">
            <div class="header">
                <span>过滤器状态查询</span>
                <span class="material-icons"
                    @click="UsageForMillimeterWaveRadarComponent.Default.NavigateToPreviousAsync()">×</span>
            </div>
            <div class="content">
                <table>
                    <thead>
                        <th>过滤器项目</th>
                        <th>是否使能</th>
                        <th>最小值</th>
                        <th>最大值</th>
                    </thead>
                    <tbody>
                        <tr v-for="information of FilterComponent.Default.AllInformation" :key="information.Id">
                            <td>{{ information.Name }}</td>
                            <td>
                                {{ information.State }}
                            </td>
                            <td>
                                {{ information.Min }}
                            </td>
                            <td>
                                {{ information.Max }}
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { FilterComponent, UsageForMillimeterWaveRadarComponent } from './ExamComponent';
</script>

<style scoped>
.filter-information {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;

    backdrop-filter: blur(1rem);
}

.container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    width: 90rem;
    height: 76rem;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    border-radius: 2rem;
    border: solid 0.6rem transparent;
    background-image: linear-gradient(#131620, #131620),
        linear-gradient(90deg, #218cde, #807de1);
    background-origin: border-box;
    background-clip: content-box, border-box;
}

.header {
    width: 100%;

    padding: 2rem;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header>span:first-of-type {
    color: white;
    font-size: 2.4rem;
    font-weight: 500;
}

.header>.material-icons {
    color: #81859C;
    font-size: 3.6rem;
}

.content {
    padding-left: 4rem;
    padding-right: 4rem;
}

table {
    width: 100%;
}

thead {
    position: relative;
}

thead::after {
    content: '';

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 0.1rem;

    background-color: #81859C1A;
}

th,
td {
    height: 4rem;
    font-size: 1.6rem;
}

th {
    color: #81859C;
}

td {
    color: #B1B1D4;
}

th:nth-of-type(1) {
    width: 30%;
    text-align: left;
}

th:nth-of-type(2) {
    width: 20%;
}

th:nth-of-type(n+2) {
    width: 25%;
}

td {
    text-align: center;
}

button {
    width: 25rem;
    height: 10rem;

    margin: auto;

    background-image: url('/static/Exam/btn-bg.png');
    background-repeat: no-repeat;
    background-position-y: -0.5rem;
    background-size: cover; 
}

button>span {
    display: inline-block;

    color: white;
    font-size: 3rem;

    text-indent: 1rem;
    letter-spacing: 1rem;
}
</style>